package com.demo.demospringboot.unit;

/**
 * 工具类
 * 负责将控制器层得到的数据传递给前端
 * 
 * */
public class Response {
	private int state;   //状态码
    private String message;   //消息
    private Object data;   //对象数据
    
    public Response() {
    }

    public Response(int state) {
        this.state = state;
    }

    public Response(int state, String message) {
        this.state = state;
        this.message = message;
    }

    public Response(int state, String message, Object data) {
        this.state = state;
        this.message = message;
        this.data = data;
    }

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
}
